<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let firstName = "jack"
    let lastName = undefined
    console.log(firstName ?? lastName)

    let x = ''
    let y = undefined
    console.log(x ?? y)
</script>
</body>
</html>